package com.xuecheng.content.convert;

import com.xuecheng.api.content.model.CourseTeacherDTO;
import com.xuecheng.api.content.model.CourseTeacherVO;
import com.xuecheng.content.entity.CourseTeacher;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <h4>xuecheng</h4>
 * <p></p>
 *
 * @author : by wujianming
 * @date : 2021-12-15 21:37
 **/
@Mapper
public interface CourseTeacherConvert {
    CourseTeacherConvert INSTANCE = Mappers.getMapper(CourseTeacherConvert.class);

    @Mapping(source = "id", target = "courseTeacherId")
    CourseTeacherDTO po2dto(CourseTeacher courseTeacher);

    @Mapping(source = "courseTeacherId", target = "id")
    CourseTeacher dto2Po(CourseTeacherDTO courseTeacher);

//    @Mapping(source = "id", target = "courseTeacherId")
    List<CourseTeacherDTO> pos2Dtos(List<CourseTeacher> courseTeacher);

    CourseTeacherDTO vo2dto(CourseTeacherVO courseTeachervVO);
}
